<div class="well well-lg">
      <div class="container">
		
       <div class="row">
	   
		  <?php
			if($ecardinfo){
				//foreach($ecards as $card){
		 ?>
			 <div class="col-sm-6 col-md-4">
			<div class="thumbnail">
			  <img data-src="holder.js/300x200" src="<?php echo base_url($ecardinfo['url']);?>" class="img-responsive" alt="<?php echo $ecardinfo['title'];?>">
			  <div class="caption">
			   <?php
		   $attributes = array('class' => 'form-horizontal', 'role' => 'form','id'=>'form_confirm','name'=>'form_confirm');
			echo form_open_multipart(site_url('ecard/confirm'),$attributes);
		   ?>
				<input type='hidden'  name="act" value="update"/>
				<input name="title" value="<?php echo $ecardinfo['title'];?>"/>
				<input type='hidden' name='id' value='<?php echo $ecardinfo['id']?>'>
				<input type="radio" name="is_using" value="1">默认
				<p><a class="btn btn-primary" id="btnsubmit" role="button">确认</a> <a class="btn btn-default" role="button" id="share">分享到朋友圈</a></p>
			  
			 <?php echo form_close();?> 
			  </div>
			</div>
		  </div>
		<?php
				//}
			}else{
				echo "没有数据!";
			}
		  ?>
		 
		</div>
      </div>
</div>
	<script src="<?php echo base_url($this->config->item('public'))?>/assets/js/jquery.form.js"></script>
	<script src="<?php echo base_url($this->config->item('public'))?>/assets/js/artDialog/jquery.artDialog.js?skin=zopo"></script>
	<script>
		$(function (){
		
				var form = $("#form_confirm");
		
				var options ={
					data:form.serialize(),
					dataType:'json',
					success:function (json){
						if(json.error != 1){
							art.dialog({
								id:'success',
								content:'保存成功！',
								lock:true
							});
							form.resetForm();
						}else{
						
							art.dialog({
								id:'error',
								content:'保存失败！',
								lock:true
							});
							
						}
					}
				};
		
		
				$('#btnsubmit').click(function (){
					form.ajaxForm();
				
					form.ajaxSubmit(options);
					return false;
				});
				
				$("#share").click(function (){
					html = '<div class="bdsharebuttonbox" data-tag="share_1"><a class="bds_mshare" data-cmd="mshare"></a><a class="bds_qzone" data-cmd="qzone" href="#"></a><a class="bds_tsina" data-cmd="tsina"></a><a class="bds_baidu" data-cmd="baidu"></a><a class="bds_renren" data-cmd="renren"></a><a class="bds_tqq" data-cmd="tqq"></a><a class="bds_more" data-cmd="more">更多</a><a class="bds_count" data-cmd="count"></a></div>';
					
					art.dialog({
						id:'sharebox',
						content:html
					});
					var share = 0;
					if(share == 0){
					with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
					share == 1;
					}
				});
		});
	
	</script>